<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: TU
  Date: 2020/2/28
  Time: 18:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>if标签</title>
</head>
<body>

<c:if test="true">
    <h3>我是真</h3>
</c:if>

<%
    //判断request域中list集合中是否为空,如果不为null着显示遍历集合
    List list = new ArrayList();
    list.add("aaa");
    request.setAttribute("list",list);

%>
<c:if test="${not empty list}">
    遍历集合
</c:if>

</body>
</html>
